#include "Scene02.hpp"

Scene02::Scene02() {
    this->setMessage("It's time to work a little: press 'E' when you are near a box to pick it up");

    b2Vec2 vertices[12];
    vertices[0].Set(-6.75f, -3.0f);
    vertices[1].Set(-0.85f, -3.0f);
    vertices[2].Set(-0.85f, -2.5f);
    vertices[3].Set(0.85f, -2.5f);
    vertices[4].Set(0.85f, -3.0f);
    vertices[5].Set(6.75f, -3.0f);
    vertices[6].Set(6.75f, -1.0f);
    vertices[7].Set(4.75f, -1.0f);
    vertices[8].Set(4.75f, 3.0f);
    vertices[9].Set(-4.75f, 3.0f);
    vertices[10].Set(-4.75f, -1.0f);
    vertices[11].Set(-6.75f, -1.0f);

    this->createRoom(2, vertices, 12);
    this->start = this->createDoor(-4.75f, -2.0f, -1.0f);
    this->createExit(5.75f, -2.0f);
    this->hero = this->createHero(-6.75f + HeroElement::WIDTH / 2.0f, -3.0f + HeroElement::HEIGHT / 2.0f);

    // Box to open exit door.
    this->exit = this->createDoor(4.75f, -2.0f, 1.0f);
    this->createSwitch(0.0f, -2.5f, 0.0f, this->exit);
    this->createBox(-2.0f, -2.5f);
}
